<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <title>Title</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
   <div style="text-align: center"><h2>员工信息修改表</h2></div>
     <div>
         <form class="form-horizontal" role="form" action="updateemp.action" method="post">
             <div class="form-group">
                 <label class="col-sm-2 control-label">id</label>
                 <div class="col-sm-10">
                     <p class="form-control-static"><s:property value="#attr.emp.empid"/> </p>
                    <input type="hidden" name="emp.empid" value="<s:property value='#attr.emp.empid'/>">
                 </div>
             </div>
             <div class="form-group">
                 <label for="inputPassword" class="col-sm-2 control-label">名字</label>
                 <div class="col-sm-10">
                     <input name="emp.ename" type="text" class="form-control" id="inputPassword" value="<s:property value='#attr.emp.ename'/> " >
                 </div>
             </div>
             <div class="form-group">
                 <label for="inputPassword" class="col-sm-2 control-label">工作职责</label>
                 <div class="col-sm-10">
                     <input  name="emp.job" type="text" class="form-control" value="<s:property value='#attr.emp.job'/> "  >
                 </div>
             </div>
             <div class="form-group">
                 <label for="inputPassword" class="col-sm-2 control-label">入职日期</label>
                 <div class="col-sm-10">
                     <input   name="emp.hireDate" type="text" class="form-control"  value="<s:property value='#attr.emp.hireDate'/> " >
                 </div>
             </div>
             <div class="form-group">
                 <label for="inputPassword" class="col-sm-2 control-label">工资薪水</label>
                 <div class="col-sm-10">
                     <input  name="emp.sal" type="text" class="form-control" value="<s:property value='#attr.emp.sal'/> "  >
                 </div>
             </div>
             <div class="form-group">
                 <label for="inputPassword" class="col-sm-2 control-label">部门名称</label>
                 <div class="col-sm-10">
                     <select name="emp.dept.deptId">
                             <s:if test="#attr.deptList !=null">
                                 <s:iterator value="#attr.deptList" id="dept">
                                     <option value="<s:property value='#attr.dept.deptId'/>"
                                             <s:if test="#attr.dept.deptId == #attr.emp.dept.deptId">selected</s:if>    >
                                         <s:property value="#attr.dept.dname"/>
                                     </option>
                                 </s:iterator>
                             </s:if>
                     </select>
                 </div>
             </div>
             <div class="form-group">
                 <div class="col-sm-10">
                     <input type="submit" class="form-control"  value="确认修改">
                 </div>
             </div>
         </form>
     </div>
</body>
</html>
